<template>
  <el-dropdown :trigger="trigger">
    <span class="el-dropdown-link">
      <i class="el-icon-more" />
    </span>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item
        v-for="item in dropdownItems"
        :key="item.type"
        @click.native="clickFunctions(item.type, options)"
      >{{ item.label }}</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
/**
 * 下拉菜单
 */
export default {
  props: {
    trigger: {
      type: String,
      default: 'click'
    },
    dropdownItems: {
      type: Array,
      default: () => []
    },
    options: {
      type: Object,
      default: () => {}
    },
    clickFunctions: {
      type: Function,
      default: () => ''
    }
  }
};
</script>

<style lang="scss" scoped>
.el-popper {
  margin-top: 0px;
}
</style>
